
A,B=map(int,input().split())
m=0
i=A
sum=0
while i<=B:
    if i<B:
        print('%5d' %i,end='')

    if i==B:
        print('%5d' %i)
    sum += i
    i+=1
    m+=1
    if m % 5 == 0:
        print("")
    
print(f'Sum = {sum}')